﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using TKB.Types.Attributes;
using TKB.Types.DataSets;
using TKB.DataService;
using System.Data;
using System.Data.SqlClient;
using TKB.Services.Tools;

namespace TKB.Services.BusinessObjects
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    [DefaultDatabase("TKBIthalatDB")]
    public class TTAnalizMetoduBS : BusinessBase
    {
        public void Save(TT_ANALIZ_METODUDataSet ds)
        {
            ITKBDataObject dto = GetTKBDataObject();
            dto.Update(ds.TT_ANALIZ_METODU);
        }

        public TT_ANALIZ_METODUDataSet SelectAll()
        {
            ITKBDataObject dto = GetTKBDataObject();
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = @"SELECT * FROM TKBIthalatDB.dbo.TT_ANALIZ_METODU";
            TT_ANALIZ_METODUDataSet ds = new TT_ANALIZ_METODUDataSet();
            dto.GetRecords(ds.TT_ANALIZ_METODU, cmd);
            return ds;
        }
    }
}
